package com.szyjjk.service;



import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.szyjjk.entity.RunModelFile;
import com.szyjjk.entity.RunModelFileExample;
import com.szyjjk.entity.SysImageCrawlerExample;
import com.szyjjk.mapper.RunModelFileMapper;

@Service
@Transactional(readOnly = true)
public class RunModelFileService {

	@Autowired
	private RunModelFileMapper runModelFileMapper;

	public List<RunModelFile> queryList() {
		
		try {
			return runModelFileMapper.selectByExample(new RunModelFileExample());
		} catch (Exception e) {
			e.printStackTrace();
		}
		return null;
	}
	@Transactional(readOnly = false, propagation = Propagation.REQUIRED)
	public void update(RunModelFile runModelFile) {
		try {
			runModelFileMapper.updateByPrimaryKeySelective(runModelFile);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	public List<RunModelFile> queryList1(Integer pageNo, Integer pageSize, String salit) {
		RunModelFileExample example=new RunModelFileExample();
	        example.setOrderByClause("id    limit " + pageNo + " , " + pageSize);
	        return runModelFileMapper.selectByExample(example);
	}

}
